<?php
class SceneController extends Yaf_Controller_Abstract{
	const NET_OK = 10;
	public function init(){
		$user = cookie::get('user');
		if(!$user){
			$this->redirect('/Index/login/');
			return false;
		}
		Yaf_Loader::import('import.php');
	}
	/**
	 * 场景首页
	 * @method indexAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function indexAction(){
		$user = cookie::get('user');
		if(!$user){
			$this->redirect('/index/login/');
			return false;
		}
		$param['work_area'] = $this->getRequest()->getPost('work_area');
		//$result = int::inst('autoBG')->workSpaceSearch($params);
	}
	/**
	 * 场景添加
	 * @method addSceneAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function addSceneAction(){
		$user = cookie::get('user');
		if(!$user){
			$this->redirect('/Index/login/');
			return false;
		}
	}
	/**
	 * 场景编辑
	 * @method workAreaEditAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function workAreaEditAction(){
		$user = cookie::get('user');
		if(!$user){
			$this->redirect('/Index/login/');
			return false;
		}
	}
	/**
	 * 场景详情
	 * @method workAreaDetailAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function workAreaDetailAction(){
		$user = cookie::get('user');
		if(!$user){
			$this->redirect('/Index/login/');
			return false;
		}
		// $params['id'] = $this->getRequest()->getRequest('id');
		// $result = net::inst('autoBG')->workSpaceDetail($params);
		// if($result->ret == self::NET_OK){
		// 	$this->getView()->assign('workDetail',$result->list[0]);
		// }else{
		// 	$this->getView()->assign('error',$result->msg);
		// }
	}
	/**
	 * 场景路点添加
	 * @method addRoadAction
	 * @return [type]      [description]
	 * @author NewFuture
	 */
	public function addRoadAction(){

	}
}